package com.xhdd.controller;


import com.xhdd.dto.Elec;
import com.xhdd.dto.Repair;
import com.xhdd.serv.CronService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;

@RestController
@RequestMapping("cron")
@Api(tags = "定时服务")
public class CronController {
    @Resource
    CronService cronService;
    /*接口之间使用*/
    @PostMapping("getMesg")
    public void getMesg(List<Elec> effects, List<Elec> steps,
                        List<String> codes, List<Repair> repairs) throws IOException {
        cronService.save(effects,steps,codes,repairs);

    }


}

